<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>账号设置&nbsp;|&nbsp;{$Think.config.WEB_TITLE}</title>
<link rel='stylesheet' type='text/css' href='__HOME__/Css/index.css' />
<script  type="text/javascript" src="__HOME__/Js/jquery-1.7.min.js"></script>
<script  type="text/javascript" src="__HOME__/Js/ajaxfileupload.js"></script>
<script  type="text/javascript">
$(document).ready(function(){
	$(".form_sub").click(function(){
		$("#loading").ajaxStart(function(){
			$(this).show();
		}).ajaxComplete(function(){
			$(this).hide();
		});
		
		var action = $("#reg_form").attr('action');
		$.ajaxFileUpload({
			url			:	action,
			secureuri	:	false,
			fileElementId:	"fileToUpload",
			dataType	:	"json",
			success		:	function(data){
				if(data.status == 'success')
				{
					var str = "<img src='__PUBLIC__/Uploads/thumb_"+ data.icon +"' style='width:50px;height:50px'>";
					$(".ajax_img").html(str);
				}
				else
				{
					alert(data.error_msg);
				}
			}
		});
	});
});
</script>
</head>
<body>
	<div id="register">
		<h3>聚集IT时事|收集IT技术</h3>
		<p class="message">用户账号设置</p>
		<form method='post' action="{:U('Index/finish_account_set')}" id="reg_form" enctype="multipart/form-data">
			<img id="loading" src="__HOME__/Images/loading.gif" style="display:none;">
			<div class='ajax_img'>
				<img src="__PUBLIC__/Uploads/thumb_{$icon}" style='width:50px;height:50px'>
			</div>
			<div style='margin-top:20px;'>
				<span class='form_span'>上传新头像</span>
				<div>
					  <a href="javascript:void(0);" class="btn_addPic">
						  <input type="file" title="支持jpg、jpeg、gif、png格式，文件小于5M"  name="fileToUpload" id="fileToUpload">
					  </a>
				</div>
			</div>
			<div style='margin-top:20px;'>
				<input type="button" value="上传" name="sub" class="form_sub"/>
			</div>
		</form>
		<ul class='reg_ul'>
			<li><a href="{:U('Index/register')}">注册</a></li>
			<li>|</li>
			<li><a href="{:U('Index/foget_pass')}">忘记密码？</a></li>
		</ul>
		<div class='clear'></div>
		<a class='back' href="{:U('Index/index')}">← 回到网站首页</a>
	</div>
</body>
</html>